package com.anycl.design.j2ee.businessdelegate;

/**
 * 业务代表
 */
public class BusinessDelegate {
    // 业务查询
    private BusinessLookUp lookUpService = new BusinessLookUp();
    // 业务服务
    private BusinessService businessService;
    // 服务类型
    private String serviceType;

    public BusinessDelegate(String serviceType) {
        this.serviceType = serviceType;
    }

    public void doTask() {
        // 寻找具体的服务窗口
        businessService = lookUpService.getBusinessService(serviceType);
        businessService.doTask();
    }
}
